<?php
namespace app\index\model;
use \think\Model;
use \think\Db;
use \think\Paginator;
class FallbackModel{

	public function insert($insert_data, $create_time='0')
	{
		if($create_time){
			$insert_data['create_time'] = date("Y-m-d H:i:s");
		}
		$id = Db::name('fallback')->insertGetId($insert_data);
		return $id;
	}

	public static function get_list()
	{
		$res = Db::name('fallback')->where('status',1)->order('id desc')->paginate(2,true);
		return $res;
	}


}